﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="XiaoHu.aspx.cs" Inherits="Web.Pages.YongShui.YongHuGL.XiaoHu" Theme="Default" %>
<%@ Register Assembly="DevExpress.Web.v15.2, Version=15.2.9.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" Namespace="DevExpress.Web" TagPrefix="dx" %>

<%@ Register src="../../../../Control/UCAlert.ascx" tagname="UCAlert" tagprefix="uc1" %>
<%@ Register src="../../../../Control/UCConfirm.ascx" tagname="UCConfirm" tagprefix="uc2" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title></title>
    <script type="text/javascript">
        function keyEnter(index) {
            var key = event.keyCode;
            if (key == 13) {
                var controls = new Array();
                controls[0] = document.getElementById("txtSheShuiDXFLDM_I");
                controls[1] = document.getElementById("txtSheShuiDXFLMC_I");
                controls[2] = document.getElementById("txtHangYeLXFLBM_I");
                controls[3] = document.getElementById("txtHangYeLXFLMC_I");

                index = index + 1;
                if (index == controls.length) {
                    index = 0;
                }
                controls[index].focus();
            }
        }
    </script>
</head>
<body>
<form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
    <div class="tabletitle1" align="center">
        销户
    </div>
    <div>
        <asp:UpdatePanel runat="server" ID="upSearch" UpdateMode="Conditional">
            <ContentTemplate>
                <div align="center">
                    <div style="width: 85%;">
                        <table align="left">
                            <tr>
                                <td>
                                    用户号：
                                </td>
                                <td>
                                    <dx:ASPxTextBox ID="txtYongHuH" runat="server" Width="494px">
                                        <ClientSideEvents KeyPress="function(s,e){var key = event.keyCode;
                                        if( key==13){$('#btnSearch').click();}}"/>
                                    </dx:ASPxTextBox>
                                </td>
                                <td>
                                    <dx:ASPxButton ID="btnSearch" runat="server" Text="查找" UseSubmitBehavior="false" OnClick="btnSearch_Click">
                                    </dx:ASPxButton>
                                </td>
                            </tr>
                            <tr>
                                <td class="right">用户名：</td>
                                <td>
                                    <table>
                                        <tr>
                                            <td>
                                                <dx:ASPxTextBox ID="txtUserName" runat="server" Width="494px" Enabled="false"></dx:ASPxTextBox>
                                            </td>
                                        </tr>
                                    </table>
                                </td>
                                </td>
                            </tr>
                            <tr>
                                <td class="right">用户地址：</td>
                                <td>
                                    <table>
                                        <tr>
                                            <td>
                                                <dx:ASPxTextBox ID="txtAddress" runat="server" Width="494px" Enabled="false"></dx:ASPxTextBox>
                                            </td>
                                        </tr>
                                    </table>
                                </td>
                            </tr>
                            <tr>
                                <td class="right">邮编：</td>
                                <td>
                                    <table>
                                        <tr>
                                            <td>
                                                <dx:ASPxTextBox ID="txtPostCode" runat="server" Width="494px" Enabled="false"></dx:ASPxTextBox>
                                            </td>
                                        </tr>
                                    </table>
                                </td>
                                </td>
                            </tr>
                            <tr>
                                <td class="right">联系部门：</td>
                                <td>
                                    <table>
                                        <tr>
                                            <td>
                                                <dx:ASPxTextBox ID="txtDepartment" runat="server" Width="494px" Enabled="false"></dx:ASPxTextBox>
                                            </td>
                                        </tr>
                                    </table>
                                </td>
                            </tr>
                            <tr>
                                <td class="right">联系人：</td>
                                <td>
                                    <table>
                                        <tr>
                                            <td>
                                                <dx:ASPxTextBox ID="txtContactor" runat="server" Width="494px" Enabled="false"></dx:ASPxTextBox>
                                            </td>
                                        </tr>
                                    </table>
                                </td>
                                </td>
                            </tr>
                            <tr>
                                <td class="right">联系电话：</td>
                                <td>
                                    <table>
                                        <tr>
                                            <td>
                                                <dx:ASPxTextBox ID="txtPhone" runat="server" Width="494px" Enabled="false"></dx:ASPxTextBox>
                                            </td>
                                        </tr>
                                    </table>
                                </td>
                            </tr>
                        </table>
                    </div>
                </div>
            </ContentTemplate>
        </asp:UpdatePanel>
    </div>
    <div align="center">
        <asp:UpdatePanel ID="upList" runat="server" UpdateMode="Conditional">
            <ContentTemplate>
                <div style="margin-top: 5px;">
                    <fieldset style="border: 1px solid cornflowerblue; text-align: left; width: 82%;">
                        <legend style="font-weight: bold;">用户水表信息</legend>
                        <dx:ASPxGridView ID="gvList2" runat="server" AutoGenerateColumns="False" KeyFieldName="S_SHUIBIAOBH" Theme="Aqua1" Width="98%"
                                         EnableCallBacks="false">
                            <Columns>
                                <dx:GridViewDataTextColumn FieldName="S_SHUIBIAOBH" Caption="水表号" Width="20%" HeaderStyle-HorizontalAlign="Center"></dx:GridViewDataTextColumn>
                                <dx:GridViewDataTextColumn FieldName="S_DIZHI" Caption="水表地址" HeaderStyle-HorizontalAlign="Center"></dx:GridViewDataTextColumn>
                                <dx:GridViewDataTextColumn FieldName="S_MINGCHENG" Caption="水表户名" Width="40%" HeaderStyle-HorizontalAlign="Center"></dx:GridViewDataTextColumn>
                            </Columns>
                            <SettingsBehavior AllowFocusedRow="True" ColumnResizeMode="Control"  ProcessFocusedRowChangedOnServer="True"/>
                            <Settings VerticalScrollableHeight="120" VerticalScrollBarMode="Auto"/>
                        </dx:ASPxGridView>
                    </fieldset>
                </div>
            </ContentTemplate>
        </asp:UpdatePanel>

        <div style="height: 3px;"></div>
        <asp:UpdatePanel ID="upBtns" runat="server" UpdateMode="Conditional">
            <ContentTemplate>
                <div style="text-align: right">
                    <hr/>

                    <dx:ASPxButton ID="btnAdd" runat="server" Text="销户" OnClick="btnXiaoHu_Click" UseSubmitBehavior="false">
                    </dx:ASPxButton>

                </div>
                <uc1:UCAlert ID="UCAlert1" runat="server"/>
                <uc2:UCConfirm ID="UCConfirm1" runat="server"/>
            </ContentTemplate>
        </asp:UpdatePanel>
    </div>

</form>
</body>
</html>